package common.Service;

import common.CIBIO;
import common.Device;
import common.NodePointer;
import common.Port;

import java.rmi.RemoteException;

public class CountServiceImpl implements CountService {
    Device device;
    Port port;
    public CountServiceImpl(Device d, Port p){
        device = d;
        port = p;
    }

    @Override
    public void sendCount(CIBIO cibIn, NodePointer from, NodePointer to, String id) throws RemoteException {
        from.name = port.portName;
        device.receiveCont(cibIn, from, to, id);
    }
}
